class Person:
    def __init__(self,name,sex,age,money,brand,save,screen,time,integration):
        self.name = name
        self.sex = sex
        self.age = age
        self.money = money
        self.brand = brand
        self.save = save
        self.screen = screen
        self.time = time
        self.integration = integration
    def send_messages(self, message):
        print(f"{self.name}发送短信：{message}")
    def make_telephone(self, phone,call_time):
        if phone == " ":
            print("没有电话号码")
            return
        else:
            if self.money < 1:
                print("余额不足")
                return
            else:
                print(f"{self.name}使用手机拨打电话：{phone}")
                if call_time > 0 and call_time <= 10:
                    print(f"通话时间为{call_time}分钟，通话费为{call_time*1}元")
                    self.money -= call_time*1
                    self.money = round(self.money, 2)
                    self.integration += call_time*15
                    print(f"剩余余额为{self.money}元，您当前积分为{self.integration}积分")
                elif call_time > 10 and call_time <= 20:
                    print(f"通话时间为{call_time}分钟，通话费为{call_time*0.8}元")
                    self.money -= call_time*0.8
                    self.money = round(self.money,2)
                    self.integration += call_time*39
                    print(f"剩余余额为{self.money}元，您当前积分为{self.integration}积分")
                else:
                    print(f"通话时间为{call_time}分钟，通话费为{call_time*0.65}元")
                    self.money -= call_time*0.65
                    self.money = round(self.money, 2)
                    self.integration += call_time*48
                    print(f"剩余余额为{self.money}元，您当前积分为{self.integration}积分")
p = Person("小明","男",18,10000,"华为",1000000,"6.5寸","12小时",1000)
if __name__ == "__main__":
    print("请选择功能：")
    print("1.发送短信")
    print("2.拨打电话")
    choice = int(input("请输入您的选择："))
    if choice == 1:
        message = input("请输入要发送短信的内容：")
        p.send_messages(message)
    elif choice == 2:
        phone = int(input("请输入要拨打的电话号码："))
        call_time = int(input("请输入通话时长："))
        p.make_telephone(phone,call_time)
    else:
        print("输入错误")